import dt from '@dt/dt'
import server from '@dt/server/dt'
import { userStore } from '@/store/user'

const api = {
  packList: server.api().post('/sa-admin/api/v1/saFunctionPackage/list'),
  packSave: server.api().post('/sa-admin/api/v1/saFunctionPackage/save'),
  pakeUpdate: server.api().post('/sa-admin/api/v1/saFunctionPackage/update'),
  pakeSync: server.api().get('/sa-admin/api/v1/saFunctionPackage/sync')
}

function getPackList(params) {
  return api.packList.fetch({
    ...params
  })
}

function packSave(info) {
  return api.packSave.fetch(info)
}

function pakeUpdate(info) {
  return api.pakeUpdate.fetch(info)
}

function pakeSync(info) {
  return api.pakeSync.fetch(info)
}
export default {
  getPackList,
  packSave,
  pakeUpdate,
  pakeSync
}
